package com.ruoyi.config.util.gaode.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description: 逆地理编码VO
 * @Title: ReGeoCodeVO
 * @Package com.sxskz.software.base.gaud.regeocode.vo
 * @Author ZhangKeChen  🤙🤙🏼🤙🏽
 * @Date 2023/5/17 11:00 AM
 */
@NoArgsConstructor
@Data
public class ReGeoCodeVO {

    @JsonProperty("status")
    private String status;
    @JsonProperty("regeocode")
    private RegeocodeDTO regeocode;
    @JsonProperty("info")
    private String info;
    @JsonProperty("infocode")
    private String infocode;

    @NoArgsConstructor
    @Data
    public static class RegeocodeDTO {
        @JsonProperty("addressComponent")
        private AddressComponentDTO addressComponent;
        @JsonProperty("formatted_address")
        private String formattedAddress;

        @NoArgsConstructor
        @Data
        public static class AddressComponentDTO {
            @JsonProperty("city")
            private Object city;
            @JsonProperty("province")
            private Object province;
            @JsonProperty("adcode")
            private Object adcode;
            @JsonProperty("district")
            private Object district;
            @JsonProperty("towncode")
            private Object towncode;
            @JsonProperty("streetNumber")
            private StreetNumberDTO streetNumber;
            @JsonProperty("country")
            private Object country;
            @JsonProperty("township")
            private Object township;
            @JsonProperty("businessAreas")
            private List<?> businessAreas;
            @JsonProperty("building")
            private BuildingDTO building;
            @JsonProperty("neighborhood")
            private NeighborhoodDTO neighborhood;
            @JsonProperty("citycode")
            private Object citycode;

            @NoArgsConstructor
            @Data
            public static class StreetNumberDTO {
                @JsonProperty("number")
                private Object number;
                @JsonProperty("location")
                private Object location;
                @JsonProperty("direction")
                private Object direction;
                @JsonProperty("distance")
                private Object distance;
                @JsonProperty("street")
                private Object street;
            }

            @NoArgsConstructor
            @Data
            public static class BuildingDTO {
                @JsonProperty("name")
                private Object name;
                @JsonProperty("type")
                private Object type;
            }

            @NoArgsConstructor
            @Data
            public static class NeighborhoodDTO {
                @JsonProperty("name")
                private Object name;
                @JsonProperty("type")
                private Object type;
            }
        }
    }
}
